package com.pic.mgt.dao;

import java.util.Date;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.pic.mgt.manager.business.BasicBusinessInfoBean;
import com.pic.mgt.manager.business.LatestBucketInfoBean;

public interface IBusinessListMgtDao extends IBasicDao {
	// 資料表內的欄位
	public static final String _businessName = "business_name";
	public static final String _creatingTime = "creating_time";
	public static final String _businessType = "business_type";
	public static final String _latestBucketNo = "latest_bucket_no";
	public static final String _latestBucketStatus = "latest_bucket_status";
	public static final String _latestBucketTime = "latest_bucket_time";
	
	public List<BasicBusinessInfoBean> findAllBasicBusinessInfo()
													throws DataAccessException;
	
	public BasicBusinessInfoBean findBasicBusinessInfoByBusinessName(String businessName) 
													throws DataAccessException;
	
	public LatestBucketInfoBean findLatestBucketInfoByBusinessName (String businessName) 
													throws DataAccessException;

	public int deleteByBusinessName(String businessName) throws DataAccessException;
	
	public int updateLatestBucketStatusByBusinessName(String latestBucketStatus, String businessName) throws DataAccessException;
	
	public int updateLatestBasicBucketInfoByBusinessName(
									int latestBucketNo,
									String latestBucketStatus,
									Date latestBucketTime,
									String businessName) throws DataAccessException;
	
}
